<template>
	<view class="modal" :class="[showModal ? 'modal-show':'']"  >
		<slot></slot>
	</view>
</template>

<script>
	export default {
		name:"modal",
		props:{
			showModal:Boolean
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss" scoped>
	.modal{
		width:100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.7);
		position: fixed;
		left:0;
		top:0;
		z-index:1001;
		visibility: hidden;
		opacity: 0;
		transition: all 0.2s;
	}
	.modal-show{
		visibility: visible;
		opacity: 1;
	}
	
</style>